Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add escapePath() #90

Merged
merged 6 commits into from
Jan 22, 2022
Merged

Add escapePath() #90

merged 6 commits into from
Jan 22, 2022

Conversation

Richienb
Copy link
Contributor

@Richienb Richienb commented Jan 22, 2022

import {getProperty, escapePath} from 'dot-prop';

const object = {
	foo: {
		bar: ['👸🏻 You found me Mario!'],
	},
	'foo.bar[0]' : '🍄 The princess is in another castle!',
};
const escapedPath = escapePath('foo.bar[0]');

console.log(getProperty(object, escapedPath));
//=> '🍄 The princess is in another castle!'

Fixes #83

Richienb and others added 2 commits January 22, 2022 17:24
Fixes sindresorhus#83

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
index.d.ts Outdated Show resolved Hide resolved
index.js Show resolved Hide resolved
@sindresorhus
Copy link
Owner

Do you plan any more work after this PR or should I release it then?

Richienb and others added 2 commits January 22, 2022 19:35
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
readme.md Outdated Show resolved Hide resolved
test.js Show resolved Hide resolved
@Richienb
Copy link
Contributor Author

Do you plan any more work after this PR or should I release it then?

Last one: #91

Signed-off-by: Richie Bendall <richiebendall@gmail.com>
Signed-off-by: Richie Bendall <richiebendall@gmail.com>
@sindresorhus sindresorhus merged commit 0505e98 into sindresorhus:main Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

escape()
2 participants